<?php
/**
*
* Vendor Table
*
* @package	VirtueMart
* @subpackage Vendor
* @author RickG
* @link http://www.virtuemart.net
* @copyright Copyright (c) 2004 - 2010 VirtueMart Team. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* VirtueMart is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* @version $Id: vendors.php 3375 2011-05-26 11:09:35Z Milbo $
*/

// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die('Restricted access');

if(!class_exists('VmTableData'))require(JPATH_COMPONENT.DS.'helpers'.DS.'vmtabledata.php');

/**
 * Vendor table class
 * The class is is used to manage the vendors in the shop.
 *
 * @package		VirtueMart
 * @author RickG
 * @author Max Milbers
 */
class TableVendor extends VmTableData {

    /** @var int Primary key */
    var $vendor_id			= 0;
    /** @var varchar Vendor name*/
    var $vendor_name  	         	= '';
    /** @var varchar Vendor phone number */
    var $vendor_phone         		= '';
    /** @var varchar Vendor store name */
    var $vendor_store_name		= '';
    /** @var text Vendor store description */
    var $vendor_store_desc   		= '';

    /** @var varchar Currency */
    var $vendor_currency	  		= '';
    /** @var varchar Path to vendor images */
    var $vendor_image_path   		= '';
    /** @var text Vendor terms of service */
    var $vendor_terms_of_service	= '';
    /** @var varchar Vendor url */
    var $vendor_url					= '';
    /** @var decimal Min POV */
    var $vendor_min_pov 	   		= 0;
    /** @var decimal Freeshipping */
    var $vendor_freeshipping  		= 0;
    /** @var text Currencies accepted by this vendor */
    var $vendor_accepted_currencies = array();
    /** @var text Vendor address format */
    var $vendor_address_format		= '';
    /** @var varchar Vendor date format */
    var $vendor_date_format			= '';

    /* @author RickG, Max Milbers
     * @param $db A database connector object
     */
    function __construct(&$db) {
		parent::__construct('#__vm_vendor', 'vendor_id', $db);
		$this->setPrimaryKey('vendor_id');
		$this->setUniqueName('vendor_name');
//		$this->setObligatoryKeys('country_2_code');
//		$this->setObligatoryKeys('country_3_code');

    }

}

//pure php no closing tag
